<%@ page pageEncoding="utf-8"%> 

<%
	request.setAttribute("layout","main.jsp");
	request.setAttribute("page_title","温岭选课系统-课程列表");
%>
<style>
	tr{
		height:30px;
	}
	.tdLeft{
		align:left;
		text-align:left;
		padding-left:20px;
		
	}
</style>
<script type='text/javascript'>
	function submitcourse()
	{
		var course_name = document.getElementById('course_name').value;
		if(course_name == '')
		{
			alert("课程名称不能为空!");
			return false;
		}
		
		var span_v = document.getElementById('course_span').value;
		var credit_v = document.getElementById('credit').value;
		var students_max_v = document.getElementById('students_max').value;
		var students_min_v = document.getElementById('students_min').value;
		
		if( ( (students_max_v !='') && (String(parseInt(students_max_v))!== students_max_v) ) || ( (students_min_v != '') && (String(parseInt(students_min_v))!== students_min_v) ) )
		{
			alert("限制人数必须为整数!");
			document.getElementById('students_max').focus;
			return false;
		}
		
		if( ( (span_v != '') && isNaN(span_v) ) || ( (credit_v != '') && isNaN(credit_v) ) )
		{
			alert("总学时数或课程学分不是有效的数字!");
			return false;
		}

	   	document.applyform.submit();
	}
</script>
<div style="width:100%; margin:1px;text-align:center;margin-top:10px;margin-bottom:50px;">
 	<p style="border:0;font-size:14px;padding-bottom:0;">
  		<b>浙江省温岭中学课程申报表</b>
	</p>
		<form action="Teacher/apply.do?src=teacher" name="applyform" method="post">
 		<table style="width:80%; margin-left:10%;">
 			<tr>
 				<td>授课教师</td>
 				<td class="tdLeft"><input type="text" size="20" name="teacher_name" value="<%=session.getAttribute("userName") %>"/></td>
 			</tr>
 			<tr>
 				<td>课程分类</td>
 				<td class="tdLeft">
 					<select style="width:160px;" name="course_type">
 						<option value="知识拓展">知识拓展</option>
 						<option value="大学初级课程">大学初级课程</option>
 						<option value="学科应用">学科应用</option>
 						<option value="兴趣特长培养">兴趣特长培养</option>
 						<option value="社会实践活动">社会实践活动</option>
 						<option value="职业技术培训">职业技术培训</option>
 					</select>
 				</td>
 			</tr>
 			<tr>
 				<td>课程名称</td>
 				<td class="tdLeft"><input type="text" size="50" name="course_name" id="course_name"/></td>
 			</tr>
 			<tr>
 				<td>总学时数</td>
 				<td class="tdLeft"><input type="text" size="20" name="course_span" id="course_span"/></td>
 			</tr>
 			<tr>
 				<td>课程学分</td>
 				<td class="tdLeft"><input type="text" size="20" name="credit" id="credit"/></td>
 			</tr>
 			<tr>
 				<td>限制人数</td>
 				<td class="tdLeft"><input type="text" size="10" name="students_max" id="students_max"/>/<input type="text" size="10" name="students_min" id="students_min"/> (最多/最少)</td>
 			</tr>
 			<tr>
 				<td>开课时间</td>
 				<td class="tdLeft">
 					<select style="width:80px;" name="year">
 						<option value="2012年">2012年</option>
 						<option value="2013年">2013年</option>
 						<option value="2014年">2014年</option>
 					</select>&nbsp;&nbsp;&nbsp;&nbsp;
 					<input type="checkbox" name="term" value="第一学期" />第一学期&nbsp;&nbsp;
 					<input type="checkbox" name="term" value="第二学期" />第二学期&nbsp;&nbsp;
 					<input type="checkbox" name="term" value="第三学期" />第三学期&nbsp;&nbsp;
 					<input type="checkbox" name="term" value="第四学期" />第四学期&nbsp;&nbsp;
 				</td>
 			</tr>
 			<tr>
 				<td>面向年级</td>
 				<td class="tdLeft">
 					<input type="checkbox" name="grade" value="高一年级" />高一年级&nbsp;&nbsp;
 					<input type="checkbox" name="grade" value="高二年级" />高二年级&nbsp;&nbsp;
 					<input type="checkbox" name="grade" value="高三年级" />高三年级&nbsp;&nbsp;
 				</td>
 			</tr>
 			<tr>
 				<td>上课时间</td>
 				<td class="tdLeft"><input type="text" size="50" name="time"/></td>
 			</tr>
 			<tr>
 				<td>上课地点</td>
 				<td class="tdLeft"><input type="text" size="50" name="location"/></td>
 			</tr>
 			<tr>
 				<td>教学方式</td>
 				<td class="tdLeft"><input type="text" size="50" name="teach_style"/></td>
 			</tr>
 			<tr>
 				<td>考核方式</td>
 				<td class="tdLeft">
 				<!-- <input type="text" size="50" name="test_style"/>  -->
 				<select style="width:80px;" name="test_style">
 						<option value="分数制">分数制</option>
 						<option value="等级制">等级制</option>
 						<option value="其它">其它</option>
 				</select>
 				</td>
 			</tr>
 			<tr>
 				<td>教学所属设备</td>
 				<td class="tdLeft"><textarea cols=50 rows=5 name="equipments" style="margin-top:5px;margin-bottom:5px;"></textarea></td>
 			</tr>
 			<tr>
 				<td>课程简介</td>
 				<td class="tdLeft"><textarea cols=50 rows=5 name="introduction"  style="margin-top:5px;margin-bottom:5px;"></textarea></td>
 			</tr>
 		</table>
		<div id="btn" style="width:100%;align:right;">
			<!--  <a href="javascript:opencourse();" style="margin-left:80%;">保存</a> -->
			<input type="reset" name="Reset" value="重置"  style="margin-left:58%;"/>&nbsp;&nbsp;&nbsp;&nbsp;
      		<input type="button" name="Submit" value="提交" onclick="javascript:submitcourse()" />
		</div>
		</form>
</div>